package com.shj.service.impl;

import com.shj.dao.SysMedicalMapper;
import com.shj.entity.SysMedical;
import com.shj.service.SysMedicalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysMedicalServiceImpl implements SysMedicalService {
    @Autowired
    private SysMedicalMapper sysMedicalMapper;

    @Override
    public List<SysMedical> findAll() {
        return sysMedicalMapper.findAll();
    }

    @Override
    public void add(SysMedical sysMedical) {
        sysMedicalMapper.insert(sysMedical);
    }

    @Override
    public SysMedical queryById(String id) {
        return sysMedicalMapper.selectByPrimaryKey(id);
    }

    @Override
    public void edit(SysMedical sysMedical) {
        sysMedicalMapper.updateByPrimaryKey(sysMedical);
    }

    @Override
    public void delete(String id) {
        sysMedicalMapper.deleteByPrimaryKey(id);
    }
}
